<template>
  <div class="box">
    <div class="headers">
      <span @click="this.$router.push('orderdispatching')">{{
        this.skips.statusMain
      }}</span>
      <p>{{ this.skips.statusSub }}</p>
      <!-- 号码保护 -->
      <div class="number">
        <span>
          <img
            src="https://p0.meituan.net/scarlett/999ccd09c3c8a8ef45a12ffb1e8abeb2988.png"
            alt=""
          />
          <label for="">{{ this.skips.privacyPhoneVo_name }}</label>
        </span>
        <span>{{ this.skips.privacyPhoneVo_desc }}</span>
        <a
          href="https://i.waimai.meituan.com/c/order/privacy_phone_rule.html?open=true"
        >
          <img
            src="https://s3plus.meituan.net/v1/mss_e2821d7f0cfe4ac1bf9202ecf9590e67/cdn-prod/file:9096d347/185eb2c85f1e6ec0f84d7c527286a4dd.png"
            alt=""
          />
        </a>
      </div>
    </div>
    <!-- center -->
    <div class="centerbox">
      <div class="ddm">订单明细</div>
      <div class="hsIndent">
        <div class="hsi">{{ this.skips.shopName }}</div>
        <a @click="isto = !isto"></a>
      </div>
      <div class="copies">
        <span>{{ this.skips.dishes_name }}</span>
        <span>{{ this.skips.dishes_count }}份</span>
        <span>￥{{ this.skips.dishes_originPrice }}</span>
        <span>￥{{ this.skips.dishes_price }}</span>
      </div>

      <div class="meal">
        <span>餐盒费</span>
        <span>￥{{ this.skips.boxFee }}</span>
      </div>

      <div class="delivery">
        <span>配送费</span>
        <span>￥{{ this.skips.delFee }}</span>
      </div>

      <div class="packet">
        <span></span>
        <span>{{ this.skips.activities_name }}</span>
        <span>{{ this.skips.activities_desc }}</span>
      </div>

      <div class="share">
        <span></span>
        <span>{{ this.skips.activities_nameSale }}</span>
        <span>{{ this.skips.activities_descSale }}</span>
      </div>

      <div class="price">
        <span>
          <div>
            <span>优惠：</span>
            <span class="label">-￥{{ this.skips.discountPrice }}</span>
          </div>
        </span>
        <span>
          <div>
            <span>实付：</span>
            <span class="label">￥{{ this.skips.payPrice }}</span>
          </div>
        </span>
      </div>
    </div>
    <!-- 配送信息 -->
    <div class="dispatching">
      <div class="ddm">配送信息</div>
      <div class="deliverytime">
        <span>送餐时间</span>
        <span>拼单成功后约30分钟送达</span>
      </div>
      <div class="deliveryaddress">
        <div class="label">配送地址</div>
        <div class="content">
          <div>
            {{ this.skips.receiver_name }}{{ this.skips.receiver_phone }}
          </div>
          <div>{{ this.skips.receiver_address }}</div>
        </div>
      </div>
    </div>
    <!-- 订单信息 -->
    <div class="orderinfo-block">
      <div class="label-with-txt">
        <span>订单编号</span>
        <span>{{ this.skips.mtOrderViewId }}</span>
      </div>
      <div class="label-with-txt">
        <span>下单时间</span>
        <span>{{ this.skips.createTime }}</span>
      </div>
      <div class="label-with-txt">
        <span>支付方式</span>
        <span>{{ this.skips.payType }}</span>
      </div>
      <div class="label-with-txt">
        <span>餐具数量</span>
        <span>{{ this.skips.dinners }}</span>
      </div>
    </div>
    <!-- 各层修饰 -->
    <div class="geceng"></div>
    <!-- 常见问题 -->
    <div class="csc-top-questions-module-bottom">
      <div class="csc-top-questions-title">
        <h3>常见问题</h3>
        <a href="">在线客服<span></span></a>
      </div>
      <div class="csc-top-questions">
        <ul>
          <li>
            <a href="">{{ this.skips.question1 }}</a>
          </li>
          <li>
            <a href="">{{ this.skips.question2 }}</a>
          </li>
          <li>
            <a href="">{{ this.skips.question3 }}</a>
          </li>
          <li>
            <a href="">{{ this.skips.question4 }}</a>
          </li>
          <li>
            <a href="">{{ this.skips.question5 }}</a>
          </li>
          <li>
            <a href="">{{ this.skips.question6 }}</a>
          </li>
          <li>
            <a href="">{{ this.skips.question7 }}</a>
          </li>
        </ul>
      </div>
    </div>
    <!-- 电话弹窗 -->
    <div class="top-ctn" v-if="isto">
      <div class="alert alert-privateTel alert-appear-done alert-enter-done">
        <div class="main">
          <div class="msg noBorder">
            <img
              src="https://s3plus.meituan.net/v1/mss_e2821d7f0cfe4ac1bf9202ecf9590e67/cdn-prod/file:9096d347/5d785701f40ad151f8814bef5c852545.png"
              alt=""
              class="priTel-shield"
            />
            <div class="addXtodial">使用该号码加密呼出</div>
            <div class="tel-number">133-****-4800</div>
            <div><a class="toRightOwn">若非本机号无法成功呼叫，请修改</a></div>
          </div>
          <div class="content">
            <div @click="isto = false" class="btn cancelBtn">取消</div>
            <div class="btn regFail readyToDial1">立即呼叫</div>
          </div>
          <div class="mainTip">为保证服务质量，您的通话可能会被录音</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { defineComponent } from 'vue'
import axios from 'axios'
// 通过vuex引入infoId
import { mapState } from 'vuex'
export default defineComponent({
  data() {
    return {
      skips: {},
      isto: false
    }
  },
  computed: {
    ...mapState(['infoId'])
  },
  async created() {
    let res = await axios({
      //?_page=1&_limit=3
      url: 'http://localhost:5000/order'
    })
    this.skips = res.data.orderdetail[this.infoId]
  }
})
</script>

<style lang="scss" scoped>
html {
  line-height: 1;
  background-color: #eee;
  font-family: '宋体';
}
* {
  margin: 0;
  padding: 0;
}
.headers {
  text-align: center;
  padding: 0.16rem 0.15rem;
  padding-bottom: 0;
  background: #fff;
  font-size: 0.14rem;
  overflow: hidden;
}
.headers span {
  color: #333;
  font-weight: 500;
  font-size: 4.8vw;
  margin-bottom: 1.46666667vw;
  display: inline-block;
}
.headers > span::after {
  background-image: url(https://s3plus.meituan.net/v1/mss_e2821d7f0cfe4ac1bf9202ecf9590e67/cdn-prod/file:9096d347/7e767825b0cbe73e93c760804289f1c2.png);
  background-size: 0.16rem 0.14rem;
  width: 0.15rem;
  height: 0.15rem;
  display: inline-block;
  vertical-align: middle;
  content: '';
}
.headers p {
  font-size: 0.16rem;
  color: #666;
  line-height: 0.3rem;
}
.number {
  display: flex;
  align-items: center;
  margin-bottom: 0.03rem;
  font-size: 0.12rem;
}
.number span:nth-child(1) {
  display: flex;
  align-items: flex-end;
  height: 0.14rem;
  width: 0.7rem;
  margin-right: 5px;
  padding: 0.02rem 0.01rem;
  border: 0.01rem solid #ffd161;
}
.number span:nth-child(1) img {
  width: 14px;
}
.number span:nth-child(1) label {
  font-size: 0.01rem;
  font-weight: 500;
}
.number span:nth-child(2) {
  font-size: 0.12rem;
  font-weight: 500;
}
.number a img {
  width: 0.16rem;
  margin-left: 0.13rem;
}
.centerbox {
  margin-bottom: 0;
}
.centerbox .ddm {
  line-height: 0.35rem;
  font-size: 0.16rem;
  padding-left: 0.16rem;
  background-color: rgb(244, 244, 244);
  font-family: '宋体';
}
.centerbox .hsIndent {
  font-size: 4vw;
  line-height: 9.33333333vw;
  display: flex;
  border-bottom: 0.01rem solid #f1f0f0;
  padding: 0.05rem 0.16rem;
  background-color: #fff;
  align-items: center;
  color: #333333;
}
.centerbox .hsIndent .hsi {
  border-right: 0.01rem solid #f1f0f0;
  flex: 1;
  display: flex;
  align-items: center;
}
.centerbox .hsIndent a {
  background: url(https://s3plus.meituan.net/v1/mss_e2821d7f0cfe4ac1bf9202ecf9590e67/cdn-prod/file:9096d347/450e429cd7745014ccf631cba0e8bcb3.png)
    no-repeat;
  background-size: contain;
  width: 5.33333333vw;
  padding-top: calc(5.33333333vw * 38 / 33);
  margin-left: 15px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  position: relative;
}
.centerbox .copies {
  display: flex;

  align-items: center;
  padding: 0 15px;
  font-size: 3.73333333vw;
  line-height: 8.53333333vw;
  background-color: #fff;
  color: #333333;
}
.centerbox .copies div:nth-child(1) {
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-size: 3.73333333vw;
  line-height: 8.53333333vw;
  background-color: #fff;
  color: #333333;
}
.centerbox .copies span:nth-of-type(1) {
  width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.centerbox .copies span:nth-of-type(2) {
  width: 12%;
  white-space: nowrap;
  text-align: left;
}
.centerbox .copies span:nth-of-type(3) {
  flex: 1 1;
  text-align: right;
  color: #999;
  text-decoration: line-through;
  white-space: nowrap;
}
.centerbox .copies span:nth-of-type(4) {
  flex: 1 1;
  text-align: right;
  white-space: nowrap;
}
.centerbox .meal {
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-size: 3.73333333vw;
  line-height: 8.53333333vw;
  background-color: #fff;
  color: #333333;
}
.centerbox .meal span:nth-of-type(1) {
  width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.centerbox .meal span:nth-of-type(2) {
  flex: 1 1;
  text-align: right;
  white-space: nowrap;
}
.centerbox .delivery {
  line-height: 10.66666667vw;
  display: flex;
  align-items: center;
  background-color: #fff;
  font-size: 3.73333333vw;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
  z-index: 1;
  border-top: 1px solid transparent;
}
.centerbox .delivery::after {
  position: absolute;
  left: 15px;
  top: 0;
  right: 0;
  height: 1px;
  background: #f1f0f0;
  z-index: -1;
  content: '';
}
.centerbox .delivery span:nth-of-type(1) {
  width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.centerbox .delivery span:nth-of-type(2) {
  flex: 1 1;
  text-align: right;
  white-space: nowrap;
}
.centerbox .packet {
  display: flex;
  align-items: center;
  font-size: 3.2vw;
  padding-top: 8px;
  padding-bottom: 5px;
  background: #fff;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
  z-index: 1;
  border-top: 1px solid transparent;
}
.centerbox .packet::after {
  position: absolute;
  left: 15px;
  top: 0;
  right: 0;
  height: 1px;
  background: #f1f0f0;
  z-index: -1;
  content: '';
}
.centerbox .packet span:nth-of-type(1) {
  background-image: url(https://p1.meituan.net/xianfu/02f69fe99e9d74ca67a9545dbff26e312048.png);
  font-size: 10vw;
  width: 4.8vw;
  height: 4.8vw;
  flex-shrink: 0;
  color: #fff;
  display: -webkit-flex;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: contain;
  background-repeat: no-repeat;
}
.centerbox .packet span:nth-of-type(2) {
  flex: 1;
  margin-left: 10px;
  color: #777777;
}
.centerbox .packet span:nth-of-type(3) {
  color: #333333;
}
.centerbox .share {
  display: flex;
  align-items: center;
  font-size: 3.2vw;
  padding-top: 8px;
  padding-bottom: 5px;
  background: #fff;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
  z-index: 1;
  padding-top: 0;
  border-top: none;
}
.centerbox .share span:nth-of-type(1) {
  width: 4.8vw;
  height: 4.8vw;
  flex-shrink: 0;
  color: #fff;
  display: -webkit-flex;
  display: flex;
  justify-content: center;
  align-items: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: none;
}
.centerbox .share span:nth-of-type(2) {
  flex: 1;
  margin-left: 10px;
  color: #777777;
}
.centerbox .share span:nth-of-type(3) {
  color: #333333;
}
.centerbox .price {
  display: flex;
  color: #777777;
  font-size: 14px;
  line-height: 40px;
  background: #fff;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
  z-index: 1;
  border-top: 1px solid transparent;
}
.centerbox .price span:nth-child(1) {
  flex: 1;
}
.centerbox .price .label {
  color: #ffb000;
}
//配送信息
.dispatching .ddm {
  line-height: 0.35rem;
  font-size: 0.16rem;
  padding-left: 0.16rem;
  background-color: rgb(244, 244, 244);
  font-family: '宋体';
}
.dispatching .deliverytime {
  font-size: 15px;
  color: #333333;
  border-bottom: 1px solid #f1f0f0;
  display: flex;
  line-height: 45px;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid transparent;
  background: #fff;
}
.dispatching .deliverytime::after {
  position: absolute;
  left: 15px;
  bottom: 0;
  right: 0;
  height: 1px;
  background: #f1f0f0;
  z-index: -1;
  content: '';
}
.dispatching .deliverytime span:nth-child(1) {
  height: 45px;
  text-align: left;
  min-width: 60px;
}
.dispatching .deliverytime span:nth-child(2) {
  flex: 1;
  margin-left: 10px;
}
.dispatching .deliveryaddress {
  font-size: 15px;
  color: #333333;
  border-bottom: 1px solid #f1f0f0;
  display: flex;
  line-height: 45px;
  background: #fff;
  line-height: inherit;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid transparent;
}
.dispatching .deliveryaddress::after {
  position: absolute;
  left: 15px;
  bottom: 0;
  right: 0;
  height: 1px;
  background: #f1f0f0;
  z-index: -1;
  content: '';
}
.dispatching .deliveryaddress .label {
  padding-top: 10px;
  height: 45px;
  text-align: left;
  min-width: 60px;
}
.dispatching .deliveryaddress .content {
  margin-left: 10px;
  padding: 10px 0;
}
.dispatching .deliveryaddress .content div:nth-child(1) {
  margin-bottom: 5px;
}
//订单详情
.orderinfo-block {
  margin-bottom: 18px;
}
.orderinfo-block .label-with-txt {
  align-items: center;
  font-size: 15px;
  color: #333333;
  border-bottom: 1px solid #f1f0f0;
  display: flex;
  line-height: 45px;
  background: #fff;
  padding-left: 15px;
  padding-right: 15px;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid transparent;
}
.orderinfo-block .label-with-txt::after {
  position: absolute;
  left: 15px;
  bottom: 0;
  right: 0;
  height: 1px;
  background: #f1f0f0;
  z-index: -1;
  content: '';
}
.orderinfo-block .label-with-txt span:nth-child(1) {
  height: 45px;
  text-align: left;
  min-width: 60px;
}
.orderinfo-block .label-with-txt span:nth-child(2) {
  flex: 1;
  margin-left: 10px;
  padding: 12.5px 0;
  line-height: 20px;
  text-align: left;
}
//隔层
.geceng {
  height: 0.2rem;
  font-size: 0.16rem;
  padding-left: 0.16rem;
  background-color: rgb(244, 244, 244);
}
//常见问题
.csc-top-questions-module-bottom {
  border: 0;
  background-repeat: repeat-x;
  background-size: 100% 1px;
  background-image: -webkit-gradient(
      linear,
      left bottom,
      left top,
      color-stop(0.5, transparent),
      color-stop(0.5, #d7d7d7)
    ),
    -webkit-gradient(linear, left top, left bottom, color-stop(0.5, transparent), color-stop(0.5, #d7d7d7));
  background-position: top, bottom;
}
.csc-top-questions-module-bottom .csc-top-questions-title {
  border: 0;
  background-repeat: repeat-x;
  background-size: 100% 1px;
  background-position: left bottom;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    color-stop(0.5, transparent),
    color-stop(0.5, #e0e0e0)
  );
  position: relative;
  margin: 0 15px;
  padding: 10px 0;
}
.csc-top-questions-module-bottom .csc-top-questions-title::after {
  position: absolute;
  left: 15px;
  bottom: 0;
  right: 0;
  height: 1px;
  background: #f1f0f0;
  z-index: -1;
  content: '';
}
.csc-top-questions-module-bottom .csc-top-questions-title > h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: #333;
}
.csc-top-questions-module-bottom .csc-top-questions-title > a:link {
  text-decoration: none;
}
.csc-top-questions-module-bottom .csc-top-questions-title > a {
  font-size: 13px;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: #333;
}
.csc-top-questions-module-bottom .csc-top-questions-title > a > span::after {
  background-image: url(https://s3plus.meituan.net/v1/mss_e2821d7f0cfe4ac1bf9202ecf9590e67/cdn-prod/file:9096d347/7e767825b0cbe73e93c760804289f1c2.png);
  background-size: 0.16rem 0.14rem;
  width: 0.15rem;
  height: 0.15rem;
  display: inline-block;
  vertical-align: middle;
  content: '';
}
.csc-top-questions-module-bottom .csc-top-questions {
  padding: 16px 10px;
}
.csc-top-questions > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.csc-top-questions > ul > li {
  display: block;
  float: left;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-align: center;
}
.csc-top-questions > ul > li > a {
  position: relative;
  border: 0;
  border-radius: 2px;
  font-size: 13px;
  display: block;
  margin: 5px;
  padding: 6px;
  color: #333;
  background-color: #fafafa;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}
.csc-top-questions > ul > li > a::before {
  content: '';
  width: 200%;
  height: 200%;
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid #e3e3e3;
  transform: scale(0.5);
  transform-origin: 0 0;
  padding: 1px;
  box-sizing: border-box;
  border-radius: 4px;
  pointer-events: none;
}
.top-ctn {
  z-index: 100;
}
.alert {
  left: 0;
  right: 0;
  bottom: 0;
}
.alert.alert-privateTel {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 100;
  font-size: 14px;
  font-family: 'PingFangSC-Regular', 'Hiragino Sans GB', Arial, Helvetica,
    '宋体', sans-serif;
}
.alert.alert-privateTel .main {
  position: absolute;
  top: 40%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 270px;
  text-align: center;
  color: #000;
  border-radius: 8px;
  background: #fff;
  line-height: 45px;
}
.alert.alert-privateTel .main .noBorder {
  border: none;
}
.alert.alert-privateTel .main .msg {
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  padding: 15px 10px;
  border-bottom: 1px solid #e6e6e6;
  box-sizing: border-box;
  justify-content: center;
}
.alert .main .msg {
  border-bottom: 1px solid #e6e6e6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 10px;
  padding-right: 10px;
}
.alert.alert-privateTel .main .msg .priTel-shield {
  height: 55px;
  width: 80px;
  -webkit-mask-size: cover;
  mask-size: cover;
}
img {
  border-style: none;
}
.alert.alert-privateTel .main .msg .addXtodial {
  font-size: 14px;
  padding: 10px 0 6px;
  font-weight: bold;
}
.alert.alert-privateTel .main .msg .tel-number {
  font-size: 24px;
  font-weight: bold;
}
.alert.alert-privateTel .main .msg .toRightOwn {
  font-size: 8px;
  color: #ffb000;
}
a {
  background-color: transparent;
  -webkit-text-decoration-skip: objects;
}
.alert.alert-privateTel .main .content {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  height: 30px;
  line-height: 30px;
  padding: 5px 10px 0;
}
.alert.alert-privateTel .main .content .cancelBtn {
  border: 1px solid #e6e6e6;
}
.alert.alert-privateTel .main .content .btn {
  margin: 0 10px;
  border: 1px solid transparent;
  border-radius: 5px;
}
.alert.alert-privateTel .main .btn {
  color: #333333;
  -webkit-flex: 1 1 50%;
  flex: 1 1 50%;
}
.alert.alert-privateTel .main .content .btn {
  margin: 0 10px;
  border: 1px solid transparent;
  border-radius: 5px;
}
.alert.alert-privateTel .main .btn.readyToDial1 {
  background: #ffd161;
  color: #000;
}
.alert.alert-privateTel .main .mainTip {
  margin-bottom: 10px;
  line-height: 30px;
  font-size: 8px;
  color: #999;
}
</style>
